<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCrawlSite extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('crawl_site', function (Blueprint $table) {
            $table->increments('site_id');
            $table->string('site_host')->comment('站点域名');
            $table->string('site_name')->comment('站点名称');
            $table->string('site_start_url', 500)->comment('起始链接');
            $table->unsignedInteger('site_interval')->default(1)->comment('间隔时间，分钟');
            $table->boolean('site_status')->default(0)->comment('状态，0不启用，1启用');
            $table->timestamps();
        });

        DB::query("alter table crawl_site comment '爬虫站点表'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('crawl_site');
    }
}
